function loadAbilityStatus(ABILITYNAME, ABILITY_ID, STATUS) {
	$('#modAbility #name').html(ABILITYNAME);
	$('#modAbility input[name=abilityId]').val(ABILITY_ID);
	setAbilityStatus(STATUS);
	
	$('#modAbility').show();
}

function setAbilityStatus(STATUS){
	$('#modAbility input[name=status]').val(STATUS);
	$('#modAbility .btn-success').removeClass('disabled');
	$('#modAbility .btn-danger').removeClass('disabled');
	$('#modAbility .btn-warning').removeClass('disabled');

	if (STATUS.toUpperCase() == 'CONFIRMED') {
		$('#modAbility .btn-success').addClass('disabled');
	} else if (STATUS.toUpperCase() == 'REJECTED') {
		$('#modAbility .btn-danger').addClass('disabled');
	} else if (STATUS.toUpperCase() == 'REQUESTED') {
		$('#modAbility .btn-warning').addClass('disabled');
	}	
}

function setStatusAndSubmit(STATUS){
	setAbilityStatus(STATUS);
	$('#modAbility form').submit();
}